#pragma once

#include "FreeImage.h"

// CBatch
class AFX_CLASS_EXPORT CBatch
{
public:
	CBatch();
	virtual ~CBatch();

	GUID  GetID() const;
	const CString& GetFileName() const;			// return only filename
	const CString& GetFileExtension() const;	// return only ext
	const CString& GetPathName()  const;		// return full path and filenam
	const CString& GetFolderPath() const;		// return full path
	int   GetPageCount() const;			        // return page count
	int   GetIndex() const;						// return page index
	void  SetIndex(int index);	     			// set page index
	void Previous();
	void Next();
	void Last();
	void First();
	
	void Init(const CString& path);
	BOOL IsChangeFrame();
	void FileLoad();	
	void FileClose();	
	FIBITMAP*  GetFrame();
	CBatch Clone();

protected:
	GUID    m_nID;					//batch unique id
	int     m_nFrameCount;			//frames in multiframe image
	int     m_nIndex;				//currently selected frame
	CString m_strFilename;			//original image path 
	CString m_strExtension; 
	CString m_strPath;
	CString m_strDirectoryPath;
	GUID    m_upperUniqueId;	
	BOOL    m_isChangeFrame;
	
	FIBITMAP* m_image;	
	FIMULTIBITMAP* m_multipleImage;

};